﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BUserAndCoM.aspx.cs" Inherits="SysManage_Company_BUserAndCoM" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1.Export, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxClasses" tagprefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户与公司</title>
    <link href="../../Styles/main.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Jscript/common.js" defer="defer"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div id="headlocation" class="headlocation" style="text-align:left;">
            <asp:Label ID="Label2" runat="server" Text="当前位置"></asp:Label>
            <img alt="当前位置" src="../../Image/weizhi.gif" />>>
            <asp:Label ID="Label12" runat="server" Text="用户与公司管理"></asp:Label>
        </div> 
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="Upd" runat="server">
            <ContentTemplate> 
                <div style="background-color: #AABFD2; width:100%; height:90px; margin:0 0 0 0;">
                    <fieldset class="fieldset2">
                        <legend><label class="lblfieldset">公司选择</label></legend>
                        <div style="margin:20px 0 25px 35px;">
                            <div style="margin:0 0 0 165px;">
                                <asp:Label runat="server" Text="公司："></asp:Label>
                                <asp:DropDownList ID="ddlcompany" runat="server" style="width:190px;" 
                                    AutoPostBack="True" onselectedindexchanged="ddlcompany_SelectedIndexChanged" 
                                    Width="303px">
                                </asp:DropDownList>
                            </div>
                        </div>
                    </fieldset>
                </div>
                <table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%; margin:15px 0 0 20px;">
                   <tr>
                    <td class="lblfieldset" align="right" style="padding:10px 15px 0 0;">不在公司的用户</td>
                    <td class="lblfieldset" style="padding:10px 0 0 15px;">在公司的用户</td>
                   </tr>
                   <tr>
                   <td align="right" style="padding:10px 15px 0 0;" valign="top">
                        <dx:ASPxGridView ID="gvselecting" runat="server" 
                            AutoGenerateColumns="False" ClientInstanceName="gvselecting" 
                            KeyFieldName="UserCode"
                            OnAfterPerformCallback="gvselecting_AfterPerformCallback" 
                            OnRowCommand="gvselecting_RowCommand" >
                            <Columns>
                                <dx:GridViewDataTextColumn Caption="序号" FieldName="rowindex" Width="50px" 
                                    ReadOnly="True">
                                    <Settings AllowAutoFilter="False" />
                                    <CellStyle HorizontalAlign="Center"></CellStyle>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="用户编号" FieldName="UserCode" Width="80px">
                                    <CellStyle HorizontalAlign="Center"></CellStyle>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="用户名" FieldName="UserName" Width="200px">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataColumn Caption="添加" Width="40px">
                                    <DataItemTemplate>
                                        <asp:Button ID="Button1" runat="server" 
                                        CommandArgument='<%# Eval("UserCode") %>'
                                        CommandName="delete" 
                                        ToolTip="选择" CssClass="btnadd" />
                                    </DataItemTemplate>
                                    <CellStyle HorizontalAlign="Center">
                                    </CellStyle>
                                </dx:GridViewDataColumn>
                            </Columns>
                            <SettingsBehavior ColumnResizeMode="Control" AllowSelectByRowClick="True" 
                                SortMode="DisplayText"></SettingsBehavior>
                            <SettingsPager AlwaysShowPager="True">
                            </SettingsPager>
                            <Settings ShowFilterRow="True" ShowFilterRowMenu="true"                        
                                ShowFilterBar="Visible">
                            </Settings>
                        </dx:ASPxGridView>
                   </td>              
                   <td style="padding:10px 0 0 15px;" valign="top">
                        <dx:ASPxGridView ID="gvselected" runat="server" 
                            AutoGenerateColumns="False" ClientInstanceName="gvselecting" 
                            KeyFieldName="UserCode"
                            OnAfterPerformCallback="gvselected_AfterPerformCallback" 
                            OnRowCommand="gvselected_RowCommand" >
                            <Columns>
                                <dx:GridViewDataTextColumn Caption="序号" FieldName="rowindex" Width="50px" 
                                    ReadOnly="True">
                                    <Settings AllowAutoFilter="False" />
                                    <CellStyle HorizontalAlign="Center"></CellStyle>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="用户编号" FieldName="UserCode" Width="80px">
                                    <CellStyle HorizontalAlign="Center"></CellStyle>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="用户名" FieldName="UserName" Width="200px">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataColumn Caption="删除" Width="40px">
                                    <DataItemTemplate>
                                        <asp:Button ID="Button1" runat="server" 
                                        CommandArgument='<%# Eval("UserCode") %>'
                                        CommandName="delete" 
                                        ToolTip="删除" CssClass="btndelete" />
                                    </DataItemTemplate>
                                    <CellStyle HorizontalAlign="Center">
                                    </CellStyle>
                                </dx:GridViewDataColumn>
                            </Columns>
                            <SettingsBehavior ColumnResizeMode="Control" AllowSelectByRowClick="True" 
                                SortMode="DisplayText"></SettingsBehavior>
                            <SettingsPager AlwaysShowPager="True">
                            </SettingsPager>
                            <Settings ShowFilterRow="True" ShowFilterRowMenu="true"                        
                                ShowFilterBar="Visible">
                            </Settings>
                        </dx:ASPxGridView>
                   </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <%--<asp:PostBackTrigger ControlID="btnExport" />--%>
            </Triggers>
        </asp:UpdatePanel>
    </form>
</body>
</html>
